<template>
	<MyPage :title="dataObj.title" :isback="true">
		<view slot="gBody">
			<view class="my-content">
				<u-parse :html="dataObj.content"></u-parse>
			</view>
		</view>
	</MyPage>
</template>		
 	
<script>
import { agreementContent } from '@/api/agreement.js'
export default {
	data() {
		return {
			id: '',
			dataObj: ''
		}
	},
	onLoad(option) {
		//获取路由参数
	    this.id = option.id ? option.id : '';
		// 获取详情
		this.getContent();
	},
	methods: {
		// 跳转页面
		openPage(url){
			this.$utils.redirectTo(url);
		},
		// 获取详情
		getContent(){
			agreementContent({
				id: this.id
			}).then(res=>{
				this.dataObj = res.data;
			}).catch(err=>{
				uni.showToast({
					title: err.msg,
					icon:'none'
				})
			});
		}
	}
}
</script>

<style lang="scss" scoped>
.login-title{
	margin-top:120rpx;
}
.login-content{
	padding:70rpx;
}
</style>